Cocktail Help Reference
Count Property
See Also  Send Feedback
Cocktail Assembly > Cocktail Namespace > WeakRefDictionary<TKey,TValue> Class : Count Property



Glossary Item Box

Returns a count of the number of items in the dictionary.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property Count As Integer
Visual Basic (Usage)Copy Code
Dim instance As WeakRefDictionary(Of TKey,TValue)
Dim value As Integer
 
value = instance.Count
C# 
public int Count {get;}
C++/CLI 
public:
property int Count {
   int get();
}

Remarks

Since the items in the dictionary are held by weak reference, the count value cannot be relied upon to guarantee the number of objects that would be discovered via enumeration. Treat the Count as an estimate only. This property also has the side effect of clearing out any GC'd refs.

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2013 All Rights Reserved.